/*
 * $Id: PacketSocket.h,v 1.1 2005-05-11 10:50:59 bacon Exp $
 */

#ifndef _XPP_NET_PACKETSOCKET_CLASS_
#define _XPP_NET_PACKETSOCKET_CLASS_

#include <xpp/net/Socket.h>
#include <xpp/net/InetAddress.h>

namespace xpp
{
	namespace net
	{

		class PacketSocket: public Socket
		{
		public:
			PacketSocket (int type);
	
			int open ();

			int getIfceIndex (const xp_char_t* name);
			int getIfceName (int index, xp_char_t* buf, xp_size_t size);

			int getIfceEtherAddress (
				const xp_char_t* name/*, EtherAddress* addr*/);

			int getIfceInetAddress (
				const xp_char_t* name, InetAddress* addr);
			int getIfceNetmask (
				const xp_char_t* name, InetAddress* addr);
			int getIfceBroadcast (
				const xp_char_t* name, InetAddress* addr);

		protected:
			int get_ifce_address (
				const xp_char_t* name, int cmd, InetAddress* addr);
		};

	}
}

#endif
